package com.xunfang.config.controller;

import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Component;

//请求转换器  (授权参数判断 )
@Component
public class MyRequestOriginParser implements RequestOriginParser {

    //拿到参数
    @Override
    public String parseOrigin(HttpServletRequest httpServletRequest) {
        return httpServletRequest.getParameter("serverName");
    }

}